package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.PayVo;
import cn.wolfcode.domain.RefundVo;
import cn.wolfcode.feign.falllback.OrderPayFeignApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author zhenfeng
 * @Date 2021/5/19
 */
@FeignClient(name = "pay-service", fallback = OrderPayFeignApiFallback.class)
public interface OrderPayFeignApi {

    @RequestMapping("/alipay/pay")
    Result<String> pay(@RequestBody PayVo payVo);

    @RequestMapping("/alipay/checkSign")
    Result<Boolean> checkSign(@RequestBody Map<String, String> params);

    @RequestMapping("/alipay/refund")
    Result<Boolean> refund(@RequestBody RefundVo refundVo);
}
